<?php TPL::output('admin/admin_header.tpl.htm'); ?>

<body >

<div id="body-wrapper">
	<div id="main-content">
		<div class="clear"></div>
		<div class="content-box">
			<div class="content-box-header">
				<h3>会员列表</h3>
				<ul class="content-box-tabs">
				</ul>
				<div class="clear"></div>
			</div>
			<div class="content-box-content">
				<div class="tab-content default-tab" id="tab1">
					<form id="_search_form" action="admin/user/list/" method="post">
						<p>
							<label>
							根据帐号名或邮箱搜索：&nbsp;&nbsp;
							<input class="text-input small-input" type="text" id="keyword" name="keyword" value="<?php echo $this->keyword; ?>"/>
							&nbsp;&nbsp;
							<input class="button" type="submit" value="搜  索" />
							<?php if($this->keyword){ ?>
							&nbsp;&nbsp;&nbsp;&nbsp;
							<input class="button" type="submit" onClick="$('#keyword').val('');$('#_search_form').submit();" value="显示全部" />
							<?php } ?>
							</label>
						</p>
					</form>
					
					<?php if(!$this->list){ ?>
					<div class="notification attention png_bg"> <a href="javascript:;" class="close"><img src="<?php echo G_STATIC_URL;?>/admin/images/icons/cross_grey_small.png" title="Close this notification" alt="close" /></a>
						<div> 没有内容 </div>
					</div>
					<?php }else{ ?>
					<table>
						<thead>
							<tr>
								<!--th><input class="check-all" type="checkbox" /></th-->
								<th>ID</th>
								<th>头像</th>
								<th>用户名</th>
								<th>邮箱</th>
								<th>用户组</th>
								<th>注册时间</th>
								<th>上次登录IP</th>
								<th>在线(min)</th>
								<th>威望</th>
								<th>操作</th>
							</tr>
						</thead>
						<tbody>
        				<?php foreach ($this->list AS $key => $val) { ?>
							<tr>
								<td><?php echo $val['uid']; ?></td>
								<td><img src="<?php echo get_avatar_url($val['uid'],'min',$val['avatar_file']); ?>"/></td>
								<td><a href="people/<?php echo $val['user_name']; ?>" target=_blank title="title"><?php echo $val['user_name']; ?></a><?php if($val['forbidden']){ ?>&nbsp;<font color="#FF0000">[禁止]</font><?php }else if(!$val['valid_email']){ ?>&nbsp;<font color="#FF0000">[未激活]</font><?php } ?></td>
								<td><?php echo $val['email']; ?></td>
								<td><?php if(!$val['valid_email']){ ?>未验证会员<?php }else{ ?><?php echo $this->system_groups[$val['group_id']]['group_name']; ?><?php } ?></td>
								<td><?php echo date("Y-m-d H:i:s", $val['reg_time']); ?></td>
								<td><?php echo long2ip(empty($val['last_ip']) ? $val['reg_ip'] : $val['last_ip']); ?></td>
								<td><?php echo round($val['online_time']/60); ?></td>
								<td><?php echo $val['reputation']; ?></td>
								<td>
									<a href="admin/user/edit/uid-<?php echo $val['uid']; ?>" title="修改"><img src="<?php echo G_STATIC_URL;?>/admin/images/icons/pencil.png"/></a>
									&nbsp;
									<?php if($val['forbidden']){ ?>
										<a href="javascript:;" onClick="forbi_user(<?php echo $val[uid]; ?>, 0)" title="解除禁止"><img src="<?php echo G_STATIC_URL;?>/admin/images/icons/tick_circle.png"/></a>
									<?php }else{ ?>
										<a href="javascript:;" onClick="forbi_user(<?php echo $val[uid]; ?>, 1)" title="禁止用户"><img src="<?php echo G_STATIC_URL;?>/admin/images/icons/cross_circle.png"/></a>
									<?php } ?>
								</td>
							</tr>
       					<?php } ?>
						</tbody>
						<tfoot>
							<tr>
								<td colspan="10">
									<div class="pagination">
										<?php echo $this->pagination; ?>
									</div>
									<div class="clear"></div>
									</td>
							</tr>
						</tfoot>
					</table>
					<?php } ?>
				</div>
		</div>
		
		<div class="clear"></div>
		<div id="notf_tip" style="display:none;" class="notification png_bg"> <a href="javascript:;" class="close"><img src="<?php echo G_STATIC_URL;?>/admin/images/icons/cross_grey_small.png" alt="关闭" /></a>
			<div id="notf_cont"></div>
		</div>
		
	</div>
</div>

<?php TPL::output('admin/admin_footer.tpl.htm'); ?>